<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('隐患上报')" />
    </head>
    <style>
        #febs-hazardReport .layui-table-view[lay-table-id="hazardReportTable"]  .layui-table-body .layui-table-cell{
            height: 75px;
            line-height: 60px;
        }
    </style>
    <body class="febs-container" id="febs-hazardReport">
        <div class="febs-body layui-fluid"  lay-title="隐患上报" >
            <div class="febs-body-search">
                <form class="jhg-body layui-form layui-table-form" lay-filter="hazardReport-table-form" id="hazardReport-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline"  >
                                        <select name="tenantId" id="tenantId" lay-search="" lay-filter="tenantId">
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${tenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">项目名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="projectId" id="queryProjectId" lay-search="" lay-filter="projectId">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">位置区域</label>
                                    <div class="layui-input-inline" >
                                        <select name="areaId" id="queryAreaId" lay-search="" >
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline" id="laydate-range">
                                    <label class="layui-form-label layui-form-label-sm">日期范围</label>
                                    <div class="layui-input-inline ">
                                        <input type="text" name="startDate" autocomplete="off" id="start-date" lay-verify="date"
                                               class="layui-input" placeholder="开始日期">
                                    </div>
                                    <div class="layui-form-mid">-</div>
                                    <div class="layui-input-inline">
                                        <input type="text" name="endDate" autocomplete="off" id="end-date" lay-verify="date"
                                               class="layui-input" placeholder="结束日期">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="hazardReportTable"  lay-data="{id: 'hazardReportTable'}"></table>
            </div>
        </div>
        <div class ="big-img-div" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:1002;width:100%;height:100%;display:none;">
            <div style="position:absolute;">
                <img style="border:5px solid #fff;" src="">
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="hazardReport-toolbar">
            <div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="hazardReport:add">
                <em class="layui-icon">&#xe654;</em> 新增
            </div>
        </script>
        <script type="text/html" id="hazardReport-tool">
            <span shiro:lacksPermission="hazardReport:eidt,hazardReport:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            {{# if(d.status=='1' || d.status=='11'){  }}
            <button type="button" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange"
                    lay-event="edit" title="编辑" shiro:hasPermission="hazardReport:edit">
                <i class="layui-icon layui-icon-edit">编辑</i>
            </button>
            <button type="button" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-red"
                    lay-event="del" title="删除" shiro:hasPermission="hazardReport:delete">
                <i class="layui-icon layui-icon-delete">删除</i>
            </button>
            <button type="button" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange" lay-event="reply" title="回复"
                    shiro:hasPermission="hazardReportPlan:reply"><i class="layui-icon layui-icon-message">回复</i></button>
            {{# }  }}
        </script>
        <script type="text/html" id="statusTransfer">
            {{# if(d.status=='1'){  }}
            <span class="layui-badge febs-tag-green">待提交</span>
            {{# }  }}
            {{# if(d.status=='2'){  }}
            <span class="layui-badge febs-tag-blue">制定计划</span>
            {{# }  }}
            {{# if(d.status=='3'){  }}
            <span class="layui-badge febs-tag-orange">整改反馈</span>
            {{# }  }}
            {{# if(d.status=='4'){  }}
            <span class="layui-badge febs-tag-magenta">整改反馈中</span>
            {{# }  }}
            {{# if(d.status=='5'){  }}
            <span class="layui-badge febs-tag-gold">整改待审核</span>
            {{# }  }}
            {{# if(d.status=='6'){  }}
            <span class="layui-badge febs-tag-purple">待签发</span>
            {{# }  }}
            {{# if(d.status=='7'){  }}
            <span class="layui-badge febs-tag-cyan">已签发</span>
            {{# }  }}
            {{# if(d.status=='10'){  }}
            <span class="layui-badge febs-tag-red">已删除（待分拣）</span>
            {{# }  }}
            {{# if(d.status=='11'){  }}
            <span class="layui-badge febs-tag-volcano">退回（制定计划）</span>
            {{# }  }}
            {{# if(d.status=='12'){  }}
            <span class="layui-badge febs-tag-lime">退回（整改反馈）</span>
            {{# }  }}
            {{# if(d.status=='13'){  }}
            <span class="layui-badge febs-tag-geekblue">退回（整改审核）</span>
            {{# }  }}
        </script>
        <script data-th-inline="javascript" >
                hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
        </script>
        <script th:src="@{/febs/js/hazard/hazardReport/hazardReportList.js(v=1)}"></script>
    </body>
</html>